// Decompiled by:       Fernflower v0.6
// Date:                28.11.2010 03:55:55
// Copyright:           2008-2009, Stiver
// Home page:           http://www.reversed-java.com


public class ItemSpawner {

   private gg KKLI;


   public ItemSpawner(gg var1) {
      this.KKLI = var1;
   }

   public final void I(int var1, int var2, int var3) {
      int var4 = this.KKLI();
      if(var4 != -1) {
         if(var2 == 0) {
            this.KKLI.g.e.a[var4] = new fn(var1, var3, var2);
         } else {
            this.KKLI.g.e.a[var4] = new fn(var1, 1, var2 - 1);
         }

      }
   }

   public final void I(int var1, int var2, int var3, int var4) {
      var4 = 3 - var4;
      if(var2 == 0) {
         this.KKLI.g.e.b[var4] = new fn(var1, var3, var2);
      } else {
         this.KKLI.g.e.b[var4] = new fn(var1, 1, var2 - 1);
      }

   }

   public final int KKLI() {
      fn var1 = null;

      for(int var2 = 0; var2 < 36; ++var2) {
         var1 = this.KKLI.g.e.a[var2];
         if(var1 == null) {
            return var2;
         }
      }

      return -1;
   }
}
